Skip to content

Conversation

@afarber
Copy link
Contributor

@afarber afarber commented Nov 30, 2025

Issue

Fixes #7259

When sidewalks and cycleways are mapped as separate ways in OSM, they often lack a name tag. This results in unhelpful
navigation instructions like "Turn right, walk 150 m" instead of "Turn right onto Main Street, walk 150 m".

This PR adds support for fallback name tags that OSM mappers use to associate sidewalks with their adjacent streets:

  • is_sidepath:of:name (~15,500 uses in OSM)
  • street:name (~9,100 uses in OSM)

The fallback only applies when:

  1. The way has no name tag
  2. The highway type is footway, cycleway, or path
  3. The way is marked as a sidepath via footway=sidewalk, cycleway=sidepath, or is_sidepath=yes

Car routing is unaffected because the fallback requires the highway type to be footway, cycleway, or path. Even if
someone mistakenly adds footway=sidewalk to a highway=primary, the fallback will not trigger since it checks the
highway type first.

Tests added

Foot profile (features/foot/sidepath_names.feature):

  • Use is_sidepath:of:name for unnamed sidewalk
  • Use street:name for unnamed sidewalk
  • is_sidepath:of:name takes priority over street:name
  • Explicit name tag takes priority over fallback
  • Use is_sidepath=yes with street:name
  • No fallback without sidepath marker

Bicycle profile (features/bicycle/sidepath_names.feature):

  • Use is_sidepath:of:name for cycleway sidepath
  • Use street:name for cycleway sidepath
  • Explicit name takes priority
  • Use is_sidepath=yes with is_sidepath:of:name
  • No fallback without sidepath marker

Car profile (features/car/sidepath_names.feature):

  • Does not use sidepath name fallback on roads
  • Does not pick up is_sidepath:of:name on roads
  • Sidepath markers do not affect car roads

Tasklist

Requirements / Relations

None

@afarber afarber force-pushed the 7259-fallback-name branch 3 times, most recently from 023243f to ecd5eb3 Compare January 8, 2026 14:32
@afarber afarber force-pushed the 7259-fallback-name branch from ecd5eb3 to 45f1d1f Compare January 9, 2026 22:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for fallback name tags for unnamed sidewalks and sidepaths in OSM routing. When sidewalks and cycleways are mapped as separate ways, they often lack a name tag, resulting in unhelpful navigation instructions. The PR enables using is_sidepath:of:name and street:name tags as fallbacks to provide better instructions.

Changes:

  • Added sidepath name fallback logic to WayHandlers.names function in profiles/lib/way_handlers.lua
  • Added comprehensive test coverage for foot, bicycle, and car profiles
  • Updated documentation with new "Way names" section and various grammar/style improvements

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
profiles/lib/way_handlers.lua Added fallback logic to use is_sidepath:of:name or street:name for unnamed sidewalks/sidepaths when appropriate sidepath markers are present
features/foot/sidepath_names.feature New test file with 6 scenarios testing sidepath name fallback for foot routing
features/bicycle/sidepath_names.feature New test file with 5 scenarios testing sidepath name fallback for bicycle routing
features/car/sidepath_names.feature New test file with 3 scenarios verifying car routing is unaffected by sidepath tags
docs/profiles.md Added "Way names" section documenting the new feature, plus minor grammar/style corrections (LUA → Lua)
CHANGELOG.md Added entry documenting the new feature under Profiles section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DennisOSRM DennisOSRM self-requested a review January 12, 2026 20:45
@DennisOSRM DennisOSRM merged commit 655ceb8 into Project-OSRM:master Jan 13, 2026
25 checks passed
@afarber afarber deleted the 7259-fallback-name branch January 13, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use more tags to determine names of footways and sidepaths

2 participants